package com.marktotop.service.impl;

import com.marktotop.mapper.PaymentMapper;
import com.marktotop.pojo.Payment;
import com.marktotop.service.IPaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author MarkToTop
 * @since 2021-07-03
 */
@Service
public class PaymentServiceImpl implements IPaymentService {

    @Autowired
    private PaymentMapper paymentMapper;

    @Override
    public boolean save(Payment payment) {
        int i = paymentMapper.insert(payment);
        if( i != 0){
            return true;
        }
        return false;
    }

    @Override
    public Payment getById(Long id) {
        return paymentMapper.selectOneById(id);
    }
}
